#pragma once

namespace Renderer
{
	class Light
	{
	protected:
		D3DLIGHT9 light;

	public:
		Light();

		D3DLIGHT9* GetLight();

		void SetType(D3DLIGHTTYPE type);

		void Move(float posX, float posY, float posZ);
		void MoveRel(float posX, float posY, float posZ);
		void GetPos(float *posX, float *posY, float *posZ);

		void Point(float fromX, float fromY, float fromZ,
			float atX, float atY, float atZ);
		void GetDirection(float *dirX, float *dirY, float *dirZ);

		void SetDiffuseColor(BYTE red, BYTE green, BYTE blue);
		void GetDiffuseColor(BYTE *red, BYTE *green, BYTE *blue) const;

		void SetSpecularColor(BYTE red, BYTE green, BYTE blue);
		void GetSpecularColor(BYTE *red, BYTE *green, BYTE *blue) const;

		void SetAmbientColor(BYTE red, BYTE green, BYTE blue);
		void GetAmbientColor(BYTE *red, BYTE *green, BYTE *blue);

		void SetRange(float range);
		float GetRange() const;

		void SetFalloff(float falloff);
		float GetFalloff() const;

		void SetAttenuation0(float attentuation);
		float GetAttenuation0() const;

		void SetAttenuation1(float attentuation);
		float GetAttenuation1() const;

		void SetAttenuation2(float attentuation);
		float GetAttenuation2() const;

		void SetTheta(float theta);
		float GetTheta() const;

		void SetPhi(float phi);
		float GetPhi() const;
	};
}